-
-
Notifications
You must be signed in to change notification settings - Fork 646
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove object-assign-deep, refactor setting popper options #516
Remove object-assign-deep, refactor setting popper options #516
Conversation
@genadis removing would be great! Can you add some tests to ensure the deeply nested objects are merged? |
@genadis I can add the tests real quick, never mind, but in the future please add tests for all new PRs 😃 |
@genadis I made some changes and added tests. Any issues with the changes? If not, I will merge. |
Went ahead and merged with my changes. If you have any issues. Please let me know! |
@rwwagner90 I believe your changes have a number of issues, I've added comments inline |
this: #486 was the original issue |
@genadis what are the issues? I do not see any comments and the issue you referenced where the shepherd class is not added is no longer an issue. |
@genadis I see the issue now, but I don't see your inline comments. Will work toward a fix. We probably should have kept deep assign. |
@genadis I just pushed the fix to master. Please let me know if you are still seeing issues or have suggestions. |
}; | ||
|
||
const tippyOptions = makeAttachedTippyOptions(attachToOpts, stepOptions); | ||
expect(tippyOptions.popperOptions.modifiers.foo).toBe('bar'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue was that if you have custom modifiers, shepherd poper modifiers get removed.
The tests does not check it
|
||
popperOptions = { | ||
...popperOptions, | ||
...tippyOptions.popperOptions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if tippyOptions.popperOptions has modifiers they will override the tippy modifiers, which was the issue in the first place.
please look at my original Pull request that solves the issue.
if (step.options.tippyOptions && step.options.tippyOptions.popperOptions) { | ||
popperOptions = { | ||
...popperOptions, | ||
...step.options.tippyOptions.popperOptions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if step.options.tippyOptions.popperOptions has modifiers they will override the tippy modifiers, which was the issue in the first place.
please look at my original Pull request that solves the issue.
yes, sorry, didn't submit it. now submitted |
looks good, thanks |
Following #488
using 1K object-assign-deep seems overkill.
especially since their readme starts with: "Caution! Danger of Death!"
It introduces unnecessary risk fo user error.